package mybatis;

import mybatis.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyBatisDemo {

    /**
     * 测试声明式事务
     */
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:spring-mybatis.xml");
        UserService userService = context.getBean("userService", UserService.class);
        userService.insert(context);
    }


}


